#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QWidget>
#include <QStringList>
#include <QHash>
class QButtonGroup;
class MyThread;


namespace Ui {
class MainWindow;
}

class MainWindow : public QWidget
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private slots:
    void add_file();
    void clear_file();
    void create_filename();
    
    void txt_file();
    void image_dir();
    
    void load_txt_file();
    void rename();
    
    void start();
    void update_status(int, bool);
private:
    void init_widget();
    void init_connect();
        
    void message(QString);
    
    Ui::MainWindow  *ui;
    QButtonGroup    *image_button_group;
    MyThread        *thread;
    
    QStringList filepath_list, filesave_list;
    QHash<QString, QString> filename_hash;
    
    int success_num, fail_num;
};

#endif // MAINWINDOW_H
